import qs from 'qs'

export default $axios => ({
    getWordList(name, keywords) {
        return $axios.post('/server/api/model/predict', {
            name,
            keywords
        })
    },
    think(keywords, word, type){
        console.log(keywords, word, type)
        return $axios.post('/server/api/feedback/evaluate',{
            keywords,
            word,
            type
        })
    },
    postRank(model, score){
        return $axios.post('/server/api/feedback/score',{
            model,
            score
        })
    },
    deploy(name, category){
        return $axios.post('/server/api/model/deploy',{
            name,
            category
        })
    },
    getModels(){
        return $axios.get('/server/api/model/deploy')
    },
    getRank(){
        return $axios.get('/server/api/feedback/score')
    }
})